<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.6.0.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        
        body {
            background-color: black;
        }
        
        .box {
            width: 660px;
            height: 400px;
            margin: 100px auto;
            box-sizing: border-box;
            border: 1px solid skyblue;
        }
        
        .box .nav {
            list-style: none;
            padding: 0 0 0 15px;
        }
        
        .box .nav li {
            float: left;
            margin: 5px 5px;
        }
    </style>
</head>

<body>
    <div class="box">
        <ul class="nav">
            <li>
                <a href="#"><img src="images/01.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="images/02.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="images/03.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="images/04.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="images/05.jpg" alt=""></a>
            </li>
            <li>
                <a href="#"><img src="images/06.jpg" alt=""></a>
            </li>
        </ul>
    </div>
    <script>
        $(function() {
            $(".nav > li ").hover(
                    function() {
                        $(this).stop().fadeTo(200, 1).siblings().stop().fadeTo(200, .4)
                    },
                    function() {
                        $(this).parent().children().stop().fadeTo(200, 1)
                    }
                )
                // 1. 鼠标离开所有图片后，所有图片的透明度都为1。
        })
    </script>
</body>

</html>